package com.cxd.base.page.tag;

import java.io.Serializable;

/**
 * @说明：分页整个页面刷新
 * @author wlsnow
 *
 */
public class TagPage implements Serializable {
	
    private static final long serialVersionUID = 587754556498974978L;
    
    //pagesize ，每一页显示多少
    private int showCount = 3;
    //总页数
    private int totalPage;
    //总记录数
    private int totalResult;
    
    //当前页数
    private int currentPage;
    //当前显示到的ID, 在mysql limit 中就是第一个参数.
    private int currentResult;
    private String sortField;
    private String order;
    
	// 查询条件
	private String queryString;
    
    
	public int getShowCount() {
		return showCount;
	}
	public void setShowCount(int showCount) {
		this.showCount = showCount;
	}
	public int getTotalPage() {
		if (totalResult % showCount==0){
			totalPage = totalResult / showCount;
		}else{
			totalPage =1+ totalResult / showCount;
		}
		if(totalPage==0){
			totalPage = 1;
		}
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public int getTotalResult() {
		return totalResult;
	}
	public void setTotalResult(int totalResult) {
		this.totalResult = totalResult;
	}
	public int getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	public int getCurrentResult() {
		return currentResult;
	}
	public void setCurrentResult(int currentResult) {
		this.currentResult = currentResult;
	}
	public String getSortField() {
		return sortField;
	}
	public void setSortField(String sortField) {
		this.sortField = sortField;
	}
	public String getOrder() {
		return order;
	}
	public void setOrder(String order) {
		this.order = order;
	}
	public String getQueryString() {
		return queryString;
	}
	public void setQueryString(String queryString) {
		this.queryString = queryString;
	}
}
